package com.weds.frame.auth.mapper;

import com.weds.frame.auth.entity.ScBusinessItem;
import com.weds.frame.auth.entity.ScBusinessOpt;
import com.weds.frame.auth.entity.ScBusinessOptApiCache;
import com.weds.frame.auth.entity.ScBusinessOptData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface ScBusinessOptAuthMapper {
    int deleteByPrimaryKey(Integer optId);

    int insert(ScBusinessOpt record);

    int insertSelective(ScBusinessOpt record);

    ScBusinessOptApiCache selectByOptApi(@Param("optApi") String optApi);

    int updateByPrimaryKeySelective(ScBusinessOpt record);

    int updateByOptNo(ScBusinessOpt record);

    int updateByPrimaryKey(ScBusinessOpt record);

    List<ScBusinessOpt> selectByRoleNo(String roleNo);

    String  getMaxNo(@Param("businessNo")String businessNo);

    List<ScBusinessOptData> getScBusinessOptByPrimary(ScBusinessItem scBusinessItem);

    String getMenuBusinessIdByMenuBusinessName(@Param("name")String name);

    List<Integer> getMenuBusinessIdByClient(@Param("client")String client);

    int deleteByOptNo(@Param("optNo") String optNo);

    int insertOrUpdate(Map<String,Object> map);
}